package com.im.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class RedisUtil {
    @Autowired
    private RedisTemplate redisTemplate;

    public Long set(String k, String v) {
        return redisTemplate.opsForSet().add(k, v);
    }

    public Long del(String k, String v) {
        return redisTemplate.opsForSet().remove(k, v);
    }
}